package com.briup.day29;

/**
 * @author ThinkBook
 */
public class TestStringBuilder {
    public static void main(String[] args) {
        //abc cba
        String message = "hello";
        //创建StringBuilder
        StringBuilder stringBuilder = new StringBuilder();
        //添加数据,append拼接数据 + +
        stringBuilder.append(message);
        stringBuilder.append(message);
        stringBuilder.append(message);
        System.out.println(stringBuilder);
        //数据反转
        stringBuilder.reverse();
        System.out.println(stringBuilder);
        //删除数据
        stringBuilder.delete(0,stringBuilder.length()-1);
        System.out.println(stringBuilder);
    }
}
